;; Added by Package.el.  This must come before configurations of
;; installed packages.  Don't delete this line.  If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.

(when (version< emacs-version "27.0")
  (package-initialize))
;; (package-initialize)

;; optimization on startup
;; https://github.com/hlissner/doom-emacs/wiki/FAQ#how-is-dooms-startup-so-fast
(defvar default-file-name-handler-alist file-name-handler-alist)
(setq file-name-handler-alist nil)
(setq gc-cons-threshold 402653184
      gc-cons-percentage 0.6)
(add-hook 'emacs-startup-hook
          (lambda ()
            "Restore defalut values after init."
            (setq file-name-handler-alist default-file-name-handler-alist)
            (setq gc-cons-threshold 800000
                  gc-cons-percentage 0.1)
            (add-hook 'focus-out-hook 'garbage-collect)))

;; load load-paths.el
(load-file (concat (file-name-directory load-file-name)
                   "damacs-load-paths.el"))

(require 'damacs-core)
(require 'damacs-packages)
(require 'damacs-key)
(require 'damacs-config)
(require 'damacs-ui)
(require 'damacs-code)
(require 'damacs-python)
(require 'damacs-org)
(require 'damacs-shell)
(require 'damacs-pyim)
;; (require 'damacs-pelican)


(put 'scroll-left 'disabled nil)

(provide 'init)
